Drop the logger < 1.6 dependency pin#45
Open
tas50 wants to merge 1 commit into
Open
Conversation
The pin was added in July 2024 to dodge logger 1.6.0, which made log levels thread-local by adding state in Logger#initialize and broke Logger subclasses that did not call super. ChefSpec does not require logger anywhere in lib/ — it only arrives transitively via chef — and the modern Chef stack handles current logger correctly. Verified against Chef 19.2.12 / Mixlib::Log 3.2.3 with logger 1.7.0: chefspec loads, Chef::Log works, and the unit suite is green. Remove the pin (and its stale "remedy before Ruby 3.3" comment) so the gem stops holding back logger for its consumers. Signed-off-by: Tim Smith <tsmith84@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the
s.add_dependency "logger", "< 1.6"pin (and its stale "remedy before Ruby 3.3" comment).Background
The pin was added in July 2024 to avoid
logger1.6.0, which introduced thread-local log levels by adding state inLogger#initialize. That brokeLoggersubclasses (across the ecosystem — Rails/ActiveSupport, and Chef'sMixlib::Log::Logger) that overrodeinitializewithout callingsuper. Expressed as< 1.6, the pin also blocks all of 1.6.x and 1.7.x.Two reasons it's safe to drop now:
loggerdirectly — there is norequire "logger"anywhere inlib/. It only arrives transitively throughchef, which owns that compatibility concern.loggerfine. Verified locally against Chef 19.2.12 / Mixlib::Log 3.2.3 with logger 1.7.0 forced:require "chefspec"succeeds,Chef::Loginstantiates and logs, and the full unit suite passes162 examples, 0 failures.Testing
Gem::Specification.load("chefspec.gemspec").validate→ valid.162 examples, 0 failures.cookstyle --chefstyle -c .rubocop.yml chefspec.gemspec→ no offenses.Note
Touches
chefspec.gemspec, as do #31 (removes the dangling rspec-expectations comment) and #40 (adds themetadatablock). All three edit different lines and should merge cleanly.